//auto gen by paipai.java.augogen ver 143
//author floatman
#ifndef _EMPLOYEEDAO_EMPLOYEE_H_
#define _EMPLOYEEDAO_EMPLOYEE_H_

#include <stdint.h>
#include <string>
#include <iostream>
#include "app_platform/help_macros.h"
#include "app_platform/intf_service.h"
#include "intf_employeedao.h"

#include "library/basic/singleton_t.h"
#include "library/basic/sync_lock.h"
#include "c2cent/library/log/CWTimeElf3.h"

#include <map>
#include "erp/employee/ddo/employeeddo_employee.h"
#include "erp/employee/ddo/employeefilterddo_employee.h"

HEADER_SELF_DEFINE_START
/**
*  请在这里增加自定义包含的头文件，否则无法合并代码
**/
using namespace c2cent::library::wtimeelf;
HEADER_SELF_DEFINE_END

namespace erp
{
namespace employee
{
namespace dao
{

#define EMPLOYEEDAO_SERVICE_VERSION "ERP_EMPLOYEE_DAO___EMPLOYEEDAO__SERVICE_VERSION__1.0 2013-10-18 14:07:50"
const std::string EMPLOYEEDAO_SERVICE_NOUSE = EMPLOYEEDAO_SERVICE_VERSION;

SERVICE class CEmployeeDao : public IEmployeeDao{
public:
		CEmployeeDao(enum DeployMethod method = DEPLOY_STANDALONE);
		~CEmployeeDao();
		 void Reset();
		static int Initialize(IUserDefineCntl* pCntl = NULL);

public:
	 /**
	 *
	 *    根据ID获取员工信息
	 *
	 */
	EXPORT(0xC00B1801) uint32_t GetEmployeeById(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 const erp::employee::ddo::CEmployeeFilterDdo& oEmployeeFilter,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 std::map<uint32_t,erp::employee::ddo::CEmployeeDdo> & mapEmployees,
		 std::string& strOutReserve
		);

	 /**
	 *
	 *    写入员工信息
	 *
	 */
	EXPORT(0xC00B1802) uint32_t AddEmployee(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 const erp::employee::ddo::CEmployeeDdo& oEmployee,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 erp::employee::ddo::CEmployeeDdo& oEmployeeBack,
		 std::string& strOutReserve
		);

	 /**
	 *
	 *    修改员工信息
	 *
	 */
	EXPORT(0xC00B1803) uint32_t UpdateEmployee(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 const erp::employee::ddo::CEmployeeDdo& oEmployee,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 erp::employee::ddo::CEmployeeDdo& oEmployeeBack,
		 std::string& strOutReserve
		);

	 /**
	 *
	 *    删除员工信息
	 *
	 */
	EXPORT(0xC00B1804) uint32_t DeleteEmployee(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 const erp::employee::ddo::CEmployeeDdo& oEmployee,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 std::string& strOutReserve
		);

SECTION_SELF_DEFINE_START
/**
* 请在这里增加自定义的成员变量和函数，否则无法合并代码
**/
private:
		std::string m_strMachineKey;
        std::string m_strSource;
        std::string m_strClientIP;
        uint32_t m_dwSceneId;
        uint32_t m_dwOperatorUin;

        static CItilGroup m_oGetEmployee_Group;
        static CItilGroup m_oAddEmployee_Group;
        static CItilGroup m_oUpdateEmployee_Group;
        static CItilGroup m_oDeleteEmployee_Group;

SECTION_SELF_DEFINE_END

private:
	enum DeployMethod m_method;
};


}
}
}

#endif /* _EMPLOYEEDAO_EMPLOYEE_H_ */
